.DEFAULT:Main
.SUFFIXES: .h .cc .o
.PATH.h: . /usr/local/include
.INCLUDES: .h

#得到当前目录下的所有CC文件
SRCS!=ls *.cc

#把CC文件转换成OBJ文件
OBJS=${SRCS:S/.cc/.o/g}

CXX=g++
CXXFLAGS=-g -DOS_POSIX
CXXLIBS=


Main:$(OBJS)
	$(CXX) -o $(.TARGET) $(.ALLSRC) $(CXXFLAGS) $(CXXLIBS)

.cc.o:
	$(CXX) -o $(.TARGET) -c $(.ALLSRC) $(INCLUDES) $(CXXFLAGS)

clean:
	@rm -f $(OBJS) Main
